package zzz.Text.text1;

import java.util.Scanner;

public class cattext {
    public static void main(String[] args) {
        Car[] arr= new Car[3];

        Scanner sc =new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            Car c = new Car();
            //汽车品牌
            System.out.println("请输入汽车品牌");
            String brand = sc.next();
            c.setBrand(brand);
            //汽车价格
            System.out.println("请输入汽车价格");
            int price = sc.nextInt();
            c.setPrice(price);
            //汽车颜色
            System.out.println("请输入汽车颜色");
            String color = sc.next();
            c.setColor(color);

            arr[i]= c;
        }
        for (int i = 0; i < arr.length; i++) {
            Car car =arr[i];
            System.out.println(car.getBrand()+","+car.getPrice()+","+car.getColor());
        }
    }
}
